//
//  HYLFooterXib.m
//  NSNotificationAndDelegateAndKVO
//
//  Created by hyl on 16/6/6.
//  Copyright © 2016年 hyl. All rights reserved.
//

#import "HYLFooterXib.h"

@interface HYLFooterXib ()
@property (weak, nonatomic) IBOutlet UIButton *loadMoreButton;
@property (weak, nonatomic) IBOutlet UIView *loadingView;

@end

@implementation HYLFooterXib
+(instancetype) footerXib{
    
    HYLFooterXib *footerXib=[[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] firstObject];
    return footerXib;
}
- (IBAction)loadMore:(UIButton *)sender {
    self.loadMoreButton.hidden=YES;
    self.loadingView.hidden=NO;
    if ([self.delegate respondsToSelector:@selector(footerXibDidClickLoadMore:)]) {
        [self.delegate footerXibDidClickLoadMore:self];
    }
    
    //NSNotificatonCenter
    [[NSNotificationCenter defaultCenter] postNotificationName:@"loadMoreDidClick" object:nil];
    
}

-(void) endLoading{

}
@end
